﻿using AntMovement.Core.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AntMovement.WPF.Tool
{
    public class StringToLogLevel
    {
        public static LogLevel ToLogLevel(object value)
        {
            switch (value.ToString())
            {
                case "信 息":
                    return LogLevel.Info;
                case "成 功":
                    return LogLevel.Success;
                case "警 告":
                    return LogLevel.Warning;
                case "错 误":
                    return LogLevel.Error;
            }
            return LogLevel.Info;
        }
    }
}
